package com.aya.activity.facade;

import com.aya.activity.core.composite.AbstractGoodsGroup;
import com.aya.activity.core.composite.GoodsGroup;
import com.aya.activity.core.model.Goods;
import com.aya.activity.core.model.Shop;

import java.math.BigDecimal;

public class DefaultShop implements Shop {

    @Override
    public <T> T getId() {
        return (T)"DEFAULT_SHOP_ID";
    }

    @Override
    public Goods getGoods(Object userId) {
        AbstractGoodsGroup goodsGroup = new GoodsGroup();
        DefaultGoods defaultGoodsA = new DefaultGoods();
        defaultGoodsA.setId("g_1");
        defaultGoodsA.setPrice(BigDecimal.valueOf(150));
        DefaultGoods defaultGoodsB = new DefaultGoods();
        defaultGoodsB.setId("g_2");
        defaultGoodsB.setPrice(BigDecimal.valueOf(200));
        goodsGroup.add(defaultGoodsA.getId(), defaultGoodsA);
        goodsGroup.add(defaultGoodsB.getId(), defaultGoodsB);
        return goodsGroup;
    }
}
